package com.cn.jx.manager.po;

import static com.jx.util.CodeUtil.getRandomId;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.jx.base.BaseEntity;
import com.jx.enumType.YesNoEnum;

/**
 * <p>Org 组织POJO类 对应数据库表名 SYS_ORG
 * <p>实现<{@link Serializable <tt>序列化接口</tt>}
 * <p>实现<{@link BaseEntity <tt>BaseEntity</tt>}
 *  
 * @author <h1>jiangxu2  2019年11月21日</h1>
 * @version v1.11.20.2019
 * @since 1.0
 * 
 */
@Entity
@Table(name="SYS_ORG")
public class Org extends BaseEntity {

	private static final long serialVersionUID = -5287303137498839759L;

	/** <p>组织名 <p>设置为{@link String String}类型*/
	@Column(name="org_name",length=64)
	private String orgName;
	
	/** <p>组织编码 <p>设置为{@link String String}类型*/
	@Column(name="org_code",length=64,unique=true,nullable=false)
	private String orgCode;
	
	/** <p>英文名 <p>设置为{@link String String}类型*/
	@Column(name="english_name",length=100)
	private String englishName;
	
	/** <p>组织单位地址 <p>设置为{@link String String}类型*/
	@Column(name="address",length=100)
	private String address;
	
	/** <p>组织单位电话<p>设置为{@link String String}类型*/
	@Column(name="phone",length=32)
	private String phone;
	
	/** <p>组织单位传真号 <p>设置为{@link String String}类型*/
	@Column(name="fax",length=32)
	private String fax;
	
	/** <p>父级组织ID<p>设置为{@link String String}类型*/
	@Column(name="parent_id",length=64)
	private String parentId;
	
	/** <p>是否主岗<p>设置为{@link Integer Integer}类型*/
	@Column(name="leader_id",length=64)
	private String leader;
	
	@Column(name="CHANNEL",length=32)
	private String channel;
	
	@Column(name="DEP_TYPE",length=32)
	private String depType;
	
	@Column(name="DEP_HIERARCHY",length=32)
	private String depHierarchy;
	
	public String getLeader() {
		return leader;
	}

	public void setLeader(String leader) {
		this.leader = leader;
	}

	/**
	 * 初始化创建类
	 * @return
	 */
	public static Org getInstance(String operUser){
		Date day=new Date();
		Org m=new Org();
		m.setId(getRandomId());
		m.setDelFlg(YesNoEnum.NO.getCode());
		m.setValidFlg(YesNoEnum.YES.getCode());
		m.setCreateTime(day);
		m.setOperatTime(day);
		m.setOperatUser(operUser);
		m.setCreateUser(operUser);
		return m;
	}
	

	/** <p>{@link String String getChannel()*/
	public String getChannel() {
		return channel;
	}

	/** <p>setChannel({@link String String channel})*/
	public void setChannel(String channel) {
		this.channel = channel;
	}

	/** <p>{@link String String getDepType()*/
	public String getDepType() {
		return depType;
	}

	/** <p>setDepType({@link String String depType})*/
	public void setDepType(String depType) {
		this.depType = depType;
	}

	/** <p>{@link String String getDepHierarchy()*/
	public String getDepHierarchy() {
		return depHierarchy;
	}

	/** <p>setDepHierarchy({@link String String depHierarchy})*/
	public void setDepHierarchy(String depHierarchy) {
		this.depHierarchy = depHierarchy;
	}

	/** <p>{@link String String}<p>getParentId()*/
	public String getParentId() {
		return parentId;
	}
	/** <p>{@link String String}<p>getOrgName()*/
	public String getOrgName() {
		return orgName;
	}
	/** <p>{@link String String}<p>getOrgCode()*/
	public String getOrgCode() {
		return orgCode;
	}
	/** <p>{@link String String}<p>getEnglishName()*/
	public String getEnglishName() {
		return englishName;
	}
	/** <p>{@link String String}<p>getAddress()*/
	public String getAddress() {
		return address;
	}
	/** <p>{@link String String}<p>getPhone()*/
	public String getPhone() {
		return phone;
	}
	/** <p>{@link String String}<p>getFax()*/
	public String getFax() {
		return fax;
	}
	
	/** <p>setParentId({@link String parentId})*/
	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	/** <p>setOrgName({@link String orgName})*/
	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}
	/** <p>setOrgCode({@link String orgCode})*/
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	/** <p>setEnglishName({@link String englishName})*/
	public void setEnglishName(String englishName) {
		this.englishName = englishName;
	}
	/** <p>setAddress({@link String address})*/
	public void setAddress(String address) {
		this.address = address;
	}
	/** <p>setPhone({@link String phone})*/
	public void setPhone(String phone) {
		this.phone = phone;
	}
	/** <p>setFax({@link String fax})*/
	public void setFax(String fax) {
		this.fax = fax;
	}
}
